package com.zjl.media.core.ffmpeg;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author linfuxin Created on 2022-03-17 15:31:38
 */
@AllArgsConstructor
@Getter
public enum FfmpegCommandEnum {
    WIN_SOFT(true, "null", false),
    WIN_INTEL_SOFT(true, "intel", false),
    WIN_INTEL_HARD(true, "intel", true),

    LINUX_INTEL_SOFT(false, "intel", false),
    LINUX_INTEL_HARD(false, "intel", true),

    ;

    private boolean winOS;
    private String gpuType;
    private boolean hard;

    public static FfmpegCommandEnum getInstance(boolean winOS, String gpuType, boolean hard) {
        for (FfmpegCommandEnum item : values()) {
            if (item.winOS == winOS && item.gpuType.equals(gpuType) && item.hard == hard) {
                return item;
            }
        }
        return null;
    }
}
